from tortoise import BaseDBAsyncClient


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `xm_category` ADD `cate_key` VARCHAR(255)   COMMENT '关键字';
        ALTER TABLE `xm_category` ADD `cate_title` VARCHAR(255)   COMMENT '标题';
        ALTER TABLE `xm_category` ADD `cate_desc` VARCHAR(255)   COMMENT '描述';"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `xm_category` DROP COLUMN `cate_key`;
        ALTER TABLE `xm_category` DROP COLUMN `cate_title`;
        ALTER TABLE `xm_category` DROP COLUMN `cate_desc`;"""
